<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
</head>
<body>
	<script>
		//定义生成器
		function * gone(aa){
			console.log(aa);
			let a=yield "成员一";
			console.log(a);
			let b=yield "成员二";
			console.log(b);
			let c=yield "成员三";
			console.log(c);
		}
		let itera=gone("aabbcc")
		itera.next("1")//没有上一个，不打印
		itera.next("2")
		itera.next("3")
		itera.next("4")
		//let index=1
		//for(let v of itera){
		//	itera.next(12)
			
		//}
	</script>
</body>
</html>